<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>两栏布局</title>
    <style>
        .outer {
            height: 100px;
            margin-bottom: 10px;
        }
        .left {
            background: tomato;
            height: 100px;
        }
        .right {
            background: gold;
            height: 100px;
        }
        .outer1 .left {
            width: 200px;
            float: left;
        }
        .outer1 .right {
            width: auto;
            margin-left: 200px;
        }
        .outer2 {
            display: flex;
        }
        .outer2 .left {
            flex: 0 0 200px;
        }
        .outer2 .right {
            flex: auto;
        }
        .outer3 .left {
            position: absolute;
            width: 200px;
        }
        .outer3 .right {
            margin-left: 200px;
        }
        .outer4 {
            position: relative;
        }
        .outer4 .left {
            width: 200px;
        }
        .outer4 .right {
            position: absolute;
            top: 0;
            left: 200px;
            right: 0;
        }
    </style>
</head>
<body>
    <!-- 左右两栏,左边固定,右边自适应  -->
    <div class="outer outer1">
        <div class="left">1-left</div>
        <div class="right">1-right</div>
    </div>
    <div class="outer outer2">
        <div class="left">2-left</div>
        <div class="right">2-right</div>
    </div>
    <div class="outer outer3">
        <div class="left">3-left</div>
        <div class="right">3-right</div>
    </div>
    <div class="outer outer4">
        <div class="left">4-left</div>
        <div class="right">4-right</div>
    </div>
</body>
</html>